package edu.uni.dormitory.mapper;

import edu.uni.dormitory.bean.StudentBed;
import edu.uni.dormitory.bean.StudentBedExample;
import java.util.List;

import edu.uni.dormitory.globalbean.ClassVo;
import edu.uni.dormitory.globalbean.StudentBedClassVo;
import edu.uni.dormitory.globalbean.StudentBedVo;
import org.apache.ibatis.annotations.Param;

/**
 * @author 陈楚城
 * @create 2019.05.03
 * @function 映射
 */
public interface StudentBedMapper {
    int countByExample(StudentBedExample example);

    int deleteByExample(StudentBedExample example);

    int deleteByPrimaryKey(Long id);

    int insert(StudentBed record);

    int insertSelective(StudentBed record);

    List<StudentBed> selectByExample(StudentBedExample example);

    StudentBed selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") StudentBed record, @Param("example") StudentBedExample example);

    int updateByExample(@Param("record") StudentBed record, @Param("example") StudentBedExample example);

    int updateByPrimaryKeySelective(StudentBed record);

    int updateByPrimaryKey(StudentBed record);
    //根据学生id查询学生住宿信息
    StudentBedVo selectStudentBedBySid(long studentId);
    //根据宿舍区id查询学生住宿信息
    List<StudentBedVo> selectStudentBedByAid(long areaId);
    //根据班级id查询学院学生住宿信息
    List<StudentBedClassVo> selectStudentBedByCid(long classId);
    //宿管中心查询所有宿舍区的学生住宿信息
    List<StudentBedVo> selectStudentBedAll();
    //根据辅导员id查询这个学院的班级信息
    List<ClassVo> selectclassbyEid(long employeeId);
    //高级筛选
    List<StudentBedClassVo> selective(StudentBedClassVo studentBedClassVo);
    //查询这个班级多少人
    int selectclasspersonNum(long classId);



}